<!DOCTYPE html>
<title>This tests that audio controls do not fade out when the audio is playing.</title>
<script src="media-controls.js"></script>
<script src="../resources/testharness.js"></script>
<script src="../resources/testharnessreport.js"></script>
<audio controls autoplay></audio>
<script>
async_test(function(t) {
    var audio = document.querySelector("audio");
    audio.src = "content/test.oga";
    audio.onplaying = t.step_func(function() {
        runAfterHideMediaControlsTimerFired(t.step_func_done(controlsTimerFired), audio);
    });

    function controlsTimerFired() {
        var controls = mediaControlsButton(audio, "panel");
        assert_false(controls.classList.contains("transparent"));
    }
});
</script>
